package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.system.api.domain.SysExpression;
import com.ruoyi.system.api.domain.SysRole;
import com.ruoyi.system.api.factory.RemoteSysRoleFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;

import org.springframework.web.bind.annotation.*;

import java.util.List;


@FeignClient(contextId = "remoteSysRoleService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteSysRoleFallbackFactory.class)
public interface RemoteSysRoleService {
    @GetMapping("/list")
    TableDataInfo list(SysRole role);

    @GetMapping("/role/list")
    R<List<SysRole>> selectRoleList(SysRole role);


//    这个需要自己写一个
    @GetMapping("/expression/list")
    R<List<SysExpression>> selectSysExpressionList(SysExpression sysExpression);

    @GetMapping("/role/{roleId}")
    R<SysRole> selectRoleById(@PathVariable("roleId") String roleId);
}
